package com.bajiao.mapper.user;

import com.bajiao.vo.user.UserAdmin;
import com.bajiao.vo.user.UserVerify;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bajiao.entity.user.User;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 普通用户
 * @Author: FanJq
 * @Date:   2024-10-1005-11
 * @Version: V1.0
 */
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user where mobile = #{mobile} and del_flag = 0")
    User queryByMobileAndNotDelFlag(String mobile);

    /**
     * @Description
     * 管理后台列表
     * @date 2025/1/2 11:17
     * @author FanJq
     * @param request
     * @return {@link List< UserAdmin>}
    */
    List<UserAdmin> getUserAdminList(UserAdmin request);

    /**
     * @Description
     * 核销列表
     * @date 2025/1/9 16:47
     * @author FanJq
     * @param keywords
     * @param orderNo
     * @param storeTitle
     * @param title
     * @param createTimeBegin
     * @param createTimeEnd
     * @return {@link List< UserVerify>}
    */
    List<UserVerify> getVerifyList(String keywords, String orderNo, String storeTitle, String title, String createTimeBegin, String createTimeEnd);

    /**
     * @Description
     * 统计用户消费金额
     * @date 2025/2/12 15:09
     * @author FanJq
     * @param userId
     * @return {@link BigDecimal}
    */
    BigDecimal getUserConsumeAmount(String userId);
}
